package frame.UserPanel;

import constant.Constant;

import javax.swing.*;
import java.awt.*;

public class Check_in_scanNum_Panel  extends JPanel {
    public Check_in_scanNum_Panel(){
        //设置背景颜色
        setBackground(new Color(72,46,115));
        //设置初始面板
        JPanel panel = new JPanel();
        panel.setBackground(new Color(72,46,115));
        panel.setPreferredSize(new Dimension(1200,680));
        add(panel);

        JLabel label1 = new JLabel("PLEASE PUT YOUR ID DOCUMENT UNDER THE CAMERA TO SCAN");
        JLabel label2 = new JLabel("AFTER COMPLETING THE SCAN, CLICK CONFIRM");
        JLabel icon = new JLabel();
        int width = 600,height = 300;//这是图片和JLabel的宽度和高度
        ImageIcon image = new ImageIcon(Constant.RESOURCE_PATH + "card.png");//实例化ImageIcon 对象
        image.setImage(image.getImage().getScaledInstance(width, height,Image.SCALE_DEFAULT ));
        icon.setIcon(image);

        label1.setFont(new Font(Font.DIALOG,Font.PLAIN,28));//设置文字字体
        label1.setForeground(Color.white);//设置文字的颜色
        label2.setFont(new Font(Font.DIALOG,Font.PLAIN,28));//设置文字字体
        label2.setForeground(Color.white);//设置文字的颜色

        panel.setLayout(null);

        label1.setBounds(150,50,1000,50);
        panel.add(label1);
        label2.setBounds(250,100,1000,50);
        panel.add(label2);
        icon.setBounds(300,-180,1000,1000);
        panel.add(icon);






    }
}
